#ifndef X3A_H
#define X3A_H

#include "common.h"

template <AllegroVersion version>
struct x3A
{
    uint16_t t;
    uint8_t subtype;
    uint8_t layer;
    
    uint32_t k;
    uint32_t next;
    
    uint32_t un;
#if __cplusplus >= 202002L
    COND_FIELD(version >= A_174, uint32_t, un1);
#endif
    uint32_t TAIL;
    operator x3A<A_174>() const;
    static constexpr AllegroVersion versions[1] = {A_174};
};
#if __cplusplus < 202002L
template <> struct x3A<A_174>
{
    uint16_t t;
    uint8_t subtype;
    uint8_t layer;

    uint32_t k;
    uint32_t next;

    uint32_t un;
    uint32_t un1;
    uint32_t TAIL;
    operator x3A<A_174>() const;
    static constexpr AllegroVersion versions[1] = {A_174};
};
#endif

#endif // X3A_H
